package cn.acewill.yxd.yunxundian.ui.sign.Presenter;

import java.io.IOException;
import java.util.HashMap;

import cn.acewill.yxd.yunxundian.pubClass.OkHttpManger;
import cn.acewill.yxd.yunxundian.pubClass.pubClass;
import cn.acewill.yxd.yunxundian.ui.sign.Contract.BackUpModel;
import cn.acewill.yxd.yunxundian.ui.sign.Contract.MEvaLoadListener;

/**
 * Created by xxx on 2018/1/19.
 */

public class BackUpModelIml implements BackUpModel {
    @Override
    public void getShopTodoEmpList(int schId, final MEvaLoadListener listener) {
        HashMap<String,String> map = new HashMap();
        map.put("task","getShopTodoEmpList");
        map.put("schid",String.valueOf(schId));
        try {
            OkHttpManger.getInstance().postAsync(pubClass.Server_namehzm, new OkHttpManger.MyCallback() {
                @Override
                public void onSuccess(String result) {
                    listener.onRequestSuccess(result);
                }

                @Override
                public void onFailture() {
                    listener.onRequestEro();
                }
            },map);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
